<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('subject/index')}">所有课程</a></li>
        <li><a href="{:url('subject/add')}">添加课程</a></li>
        <li class="active"><a>编辑课程</a></li>
    </ul>
    <form class="form-horizontal js-ajax-form margin-top-20" action="{:url('subject/edit')}" method="post">
        <div class="form-group">
            <label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>课程名称</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-name" name="name" value="{$subject.name}">
            </div>
        </div>
        <div class="form-group">
            <label for="name" class="col-sm-2 control-label"><span class="form-required">*</span>授课老师</label>
            <div class="col-md-6 col-sm-10">
                <select name="teacher_id" class="form-control">
                    <volist name="teacher" id="vo">
                        <if $vo.id==$subject.teacher_id>
                            <option value="{$vo.id}" selected>{$vo.name}</option>
                        <else>
                            <option value="{$vo.id}">{$vo.name}</option>
                        </else>
                        </if>
                    </volist>
                </select>        
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <input type="hidden" name="id" value="{$subject.id}"/>
                <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
                <a class="btn btn-default" href="{:url('admin/subject/index')}">{:lang('BACK')}</a>
            </div>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>